package com.foreveross.fetl.common.vo;

import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

import com.foreveross.fetl.util.XML2BeanUtils;

public class TaskInfoXmlBean {

	private String company;

	private List<String> lines;

	public void addLines(String line) {
		if (lines == null) {
			lines = new ArrayList<String>();
		}
		lines.add(line);
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public List<String> getLines() {
		return lines;
	}

	public void setLines(List<String> lines) {
		this.lines = lines;
	}

	public static TaskInfoXmlBean getXmlBean() throws Exception {
		String xmlFilePath = "classpath*:/WEB-INF/classes/beanXml/task_CZ_International.xml";
		// String filename=
		// TaskInfoXmlBean.class.getClassLoader().getResource(xmlFilePath).getPath();

		// System.out.print(filename);
		InputStream in = ClassLoader.getSystemResourceAsStream(xmlFilePath);
		// InputStream in
		// =Thread.currentThread().getContextClassLoader().getSystemResourceAsStream(filename);
		TaskInfoXmlBean task = null;
		task = XML2BeanUtils.xmlSring2Bean(TaskInfoXmlBean.class, in);
		return task;
	}

	public static List<String> getInternationalLines() {
		List<String> lines = new ArrayList<String>();
		String[] list = { "CAN-SYD", "CAN-MEL", "CAN-BNE", "CAN-YVR",
				"CAN-LAX", "CAN-CDG", "PEK-AMS", "CAN-AMS", "CAN-ICN",
				"SHA-ICN", "SHE-ICN", "DLC-ICN", "CAN-NRT", "DLC-NRT",
				"SHE-NRT", "CAN-SIN", "CAN-BKK", "CAN-KUL", "CAN-SGN",
				"CAN-MNL", "CAN-AKL", "CAN-KTM", "CAN-PER", "CAN-LON",
				"CAN-PNH", "CAN-REP", "CAN-HAN", "CAN-RGN", "CAN-PEN",
				"CAN-DEL", "CAN-CGK", "CAN-DAC", "CAN-MLE", "CAN-CNX",
				"CAN-DPS", "CAN-MOW", "CAN-HKG", "CAN-TPE", "CAN-DXB",
				"CAN-FUK", "CAN-NGO", "CAN-OSA", };
		for (String str : list) {
			lines.add(str);
		}
		return lines;
	}

	public static List<String> getDomesticLines() {
		List<String> lines = new ArrayList<String>();
		String[] list = { "CAN-CGO", "CAN-CGQ", "CAN-CKG", "CAN-CSX",
				"CAN-CTU", "CAN-DLC", "CAN-FOC", "CAN-HAK", "CAN-HFE",
				"CAN-HGH", "CAN-HRB", "CAN-KHN", "CAN-KMG", "CAN-KWE",
				"CAN-KWL", "CAN-NGB", "CAN-NKG", "CAN-NNG", "CAN-NNY",
				"CAN-PEK", "CAN-PVG", "CAN-SHA", "CAN-SHE", "CAN-SIA",
				"CAN-SWA", "CAN-SYX", "CAN-TAO", "CAN-TNA", "CAN-TSN",
				"CAN-TYN", "CAN-URC", "CAN-WNZ", "CAN-WUH", "CAN-XMN",
				"CAN-YIH", "CAN-YIW", "CAN-ZHA", "CGO-CAN", "CGO-CTU",
				"CGO-HAK", "CGO-PEK", "CGO-SZX", "CGO-URC", "CGO-XMN",
				"CGQ-CAN", "CGQ-PEK", "CGQ-PVG", "CGQ-SYX", "CGQ-SZX",
				"CKG-CAN", "CKG-KMG", "CKG-KWL", "CKG-PEK", "CKG-PVG",
				"CKG-SYX", "CKG-SZX", "CKG-URC", "CSX-CAN", "CSX-PEK",
				"CSX-SHA", "CSX-XMN", "CTU-CAN", "CTU-CGO", "CTU-KWE",
				"CTU-PEK", "CTU-SHE", "CTU-SZX", "CTU-URC", "CTU-WUH",
				"DLC-CAN", "DLC-NKG", "DLC-PEK", "DLC-PVG", "DLC-SZX",
				"FOC-CAN", "HAK-CAN", "HAK-CGO", "HAK-PEK", "HAK-PVG",
				"HAK-SZX", "HAK-WUH", "HFE-CAN", "HGH-CAN", "HGH-PEK",
				"HGH-SYX", "HGH-SZX", "HRB-CAN", "HRB-PEK", "HRB-SYX",
				"HRB-SZX", "JHG-KMG", "KHG-URC", "KHN-CAN", "KHN-SZX",
				"KMG-CAN", "KMG-CKG", "KMG-HAK", "KMG-JHG", "KMG-WUH",
				"KRL-URC", "KWE-CAN", "KWE-PEK", "KWE-PVG", "KWE-SHE",
				"KWE-SZX", "KWL-CAN", "KWL-PEK", "KWL-SIA", "KWL-SZX",
				"NGB-CAN", "NKG-CAN", "NKG-DLC", "NNG-CAN", "NNG-PEK",
				"NNG-PVG", "NNG-SZX", "PEK-CAN", "PEK-CGO", "PEK-CGQ",
				"PEK-CKG", "PEK-CSX", "PEK-CTU", "PEK-DLC", "PEK-HAK",
				"PEK-HGH", "PEK-HRB", "PEK-KWE", "PEK-KWL", "PEK-NNG",
				"PEK-SHE", "PEK-SYX", "PEK-SZX", "PEK-URC", "PEK-WUH",
				"PVG-CAN", "PVG-CGQ", "PVG-CKG", "PVG-DLC", "PVG-SHE",
				"PVG-SWA", "PVG-SYX", "PVG-SZX", "PVG-WUH", "SHA-CAN",
				"SHA-CGO", "SHA-CGQ", "SHA-SZX", "SHA-URC", "SHE-CAN",
				"SHE-CTU", "SHE-HGH", "SHE-KMG", "SHE-NKG", "SHE-PEK",
				"SHE-PVG", "SHE-SYX", "SIA-CAN", "SIA-KWL", "SIA-SZX",
				"SWA-CAN", "SYX-CAN", "SYX-CKG", "SYX-HRB", "SYX-PEK",
				"SYX-PVG", "SZX-CGO", "SZX-CKG", "SZX-CTU", "SZX-HAK",
				"SZX-HGH", "SZX-KHN", "SZX-PEK", "SZX-PVG", "SZX-SHA",
				"SZX-WUH", "TSN-CAN", "TYN-CAN", "URC-AKU", "URC-CAN",
				"URC-CGO", "URC-CSX", "URC-CTU", "URC-HTN", "URC-KHG",
				"URC-KRL", "URC-PEK", "URC-XIY", "URC-YIN", "WNZ-CAN",
				"WUH-CAN", "WUH-CKG", "WUH-CTU", "WUH-KMG", "WUH-PEK",
				"WUH-PVG", "WUH-SZX", "WUH-XMN", "WUH-ZGC", "XMN-CAN",
				"XMN-CSX", "XMN-SZX", "YIN-URC", "YIW-CAN", "YNJ-PEK",
				"ZUH-PEK" ,
//				//new 东海 "SZX-CGO","DLC-SZX"，"HRB-SZX" ,"CGO-SZX"已有
//				"SZX-DLC","SZX-HLD","SZX-HRB","NGB-SZX",
//				"SZX-NGB","DLC-NGB","HLD-SZX",
//				"HLD-HRB","HRB-HLD","NGB-DLC",
//				//首都 CAN-HGH CAN-CKG
//				"BJS-HET","HET-URC","BJS-LJG","LJG-JHG","HET-BJS",
//				"BJS-ERL","HET-WUH","HET-HAK","SIA-TNA","BJS-JXA",
//				"KWL-XMN","NKG-LJG",
//				//吉祥 "CAN-SHA",,"SZX-SHA"
//				"PEK-SHA","BAV-SHA","CKG-SHA","SHA-PEK","SHA-BAV",
//				"SHA-CKG","SHA-HRB","SHA-HAK","SHA-HAK","XIY-SHA",
//				"TYN-HGH","TSN-SHA","SHE-SHA","HGH-TAO",
//				//四川 CTU-PEK CAN-CTU CKG-SZX CKG-SHA "CTU-CAN" PEK-CTU SHA-CKG SZX-CKG
//				"CTU-HRB","CTU-CSX","CTU-HAK","CTU-TAO","CTU-NKG","CTU-DLC"
//				
			
				};
		for(String str :list){
			lines.add(str);
		}
		return lines;
	}
	
	public static List<String> getShenghangLine(){
		List<String> lines = new ArrayList<String>();
		String[] list = { "SZX-KHN", "HAK-CAN", "SZX-SYX", "SZX-KWL",
				"CAN-HAK", "KWE-CAN", "FOC-SZX", "HAK-SZX", "SZX-HAK",
				"DLC-KWE", "CAN-NNG", "PVG-SZX", "KWL-NKG", "SZX-KWE",
				"PEK-NNG", "CKG-SZX", "NNG-CAN", "SZX-PEK", "CKG-NKG",
				"PEK-SZX", "KWE-SZX", "NNG-PEK", "SZX-NNG", "SHA-SZX",
				"CAN-KWE", "CAN-WUX", "CAN-WNZ", "CAN-NKG", "HGH-SZX",
				"SZX-INC", "WNZ-CAN", "CAN-CTU", "SZX-CGO", "CTU-SZX" };
		for(String str :list){
			lines.add(str);
		}
		return lines;
	}
}
